import java.util.Scanner;

public class Homework6 {
    //递归求 N 的阶乘
    public static int func(int n){
        if(n==0){
            return 1;
        }
        return n*func(n-1);
    }
    public static void main(String[] args){
        Scanner intput = new Scanner(System.in);
        int a = intput.nextInt();
        int b = func(a);
        System.out.println(b);
    }
}
